﻿using System;
using System.Linq;
using Array3DExtensions;

namespace MyClasses
{
    class Program
    {
        static void Main(string[] args)
        {
            Int32[, ,] array = new Int32[9, 9, 9];
            array[8, 8, 8] = 17;

            if (array.SearchInDirections(17, new Index3D(0, 0,0), Index3D.Down + Index3D.Right + Index3D.In))
            {
                Console.WriteLine("Array Contains");
            }
            else
            {
                Console.WriteLine("Array Does not contain!");
            }

            string[, ,] array2 = new string[9, 9, 9];
            array2.Init("BB");
            array2[8, 8, 8] = "AAAA";

            if (array2.SearchInDirections("AAAA", new Index3D(0, 0, 0), Index3D.Down + Index3D.Right + Index3D.In))
            {
                Console.WriteLine("Array Contains");
            }
            else
            {
                Console.WriteLine("Array Does not contain!");
            }

            if (array.IsInBoundary(new Index3D(0, 0, 0)))
            {
                Console.WriteLine("Valid index");
            }
            else 
            {
                Console.WriteLine("Invalid index");
            }
        }
    }
}
